import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Findpas from '../views/Findpas.vue'
import Order from '../views/Order.vue'
import Main from '../views/Main.vue'
import Seek from '../views/Seek.vue'
import Submit from '../views/Submit.vue'
import Paysuccess from '../views/Paysuccess.vue'
import Confirmgit from '../views/Confirmgit.vue'
import State from '../views/State.vue'
import Mask from '../views/Mask.vue'
import List from '../views/List.vue'
import Lists from '../views/Lists.vue'
Vue.use(VueRouter)

const routes = [{
		path: '/home',
		name: 'Home',
		component: Home,
		children: [{
				path: '/home',
				name: 'Main',
				component: () => import('../views/Main.vue')
			},
			{
				path: '/home/cart',
				name: 'Cart',
				component: () => import('../views/Cart.vue')
			},
			{
				path: '/home/order',
				name: 'Order',
				component: () => import('../views/Order.vue')
			},
			{
				path: '/home/mine',
				name: 'Mine',
				component: () => import('../views/Mine.vue')
			}
		]
	},
	{
		path: '/about',
		path: '/about',
		name: 'About',
		component: () => import('../views/About.vue')
	},
	{
		path: '/',
		name: 'Login',
		component: () => import('../views/Login.vue')
	},
	{
		path: '/register',
		name: 'Register',
		component: () => import('../views/Register.vue')
	},
	{path: '/findpas',name: 'Findpas',component: () => import('../views/Findpas.vue')
	},
	{path: '/order',name: 'Order',component: () => import('../views/Order.vue')
	},
	{path: '/address',name: 'Address',component: () => import('../views/Address.vue')
	},
	{path: '/editAddress',name: 'EditAddress',component: () => import('../views/EditAddress.vue')
	},
	{path: '/addAddress',name: 'AddAddress',component: () => import('../views/AddAddress.vue')
	},
	{path: '/mine',name: 'Mine',component: () => import('../views/Mine.vue')
	},
	{path: '/seek',name: 'Seek',component: () => import('../views/Seek.vue')
	},
	{path: '/submit',name: 'Submit',component: () => import('../views/Submit.vue')
	},
	{path: '/paysuccess',name: 'Paysuccess',component: () => import('../views/Paysuccess.vue')
	},
	{path: '/confirmgit',name: 'Confirmgit',component: () => import('../views/Confirmgit.vue')
	},
	{path: '/state',name: 'State',component: () => import('../views/State.vue')
	},
	{path: '/mask',name: 'Mask',component: () => import('../views/Mask.vue')
	},
	{path: '/lists',name: 'List',component: () => import('../views/Lists.vue')
	}
]

const router = new VueRouter({
	routes
})

export default router
